const baseList = [{
	// 物料列表
	FormId: 'BD_MATERIAL',
	FilterString: [],
	OrderString: "",
	FieldKeys: "FName,FNumber,FMaterialGroup,FStoreUnitID,FStockId,FSpecification",
	SearchField: "FName",
	OnlySign: "FNumber",
	GroupInfo: {
		FormId: "AMB_MaterialGroup",
		Field: "FMaterialGroup"
	},
	Type: 1
}, {
	// 供应商列表
	FormId: 'BD_Supplier',
	FilterString: [],
	OrderString: "",
	FieldKeys: "FName,FNumber,FGroup,FSupplierId,F_QUQY_IsMarket",
	SearchField: "FName",
	OnlySign: "FNumber",
	GroupInfo: {
		FormId: "BD_SupplierGroup",
		Field: "FGroup"
	},
	Type: 1
}, {
	// 计量单位
	FormId: 'BD_UNIT',
	FilterString: [],
	OrderString: "",
	FieldKeys: "FName,FNumber,FUNITID",
	SearchField: "FName",
	OnlySign: "FNumber",
	Type: 1
}, {
	// 客户列表
	// FGroup  
	FormId: 'BD_Customer',
	FilterString: [],
	OrderString: "",
	FieldKeys: "FCUSTID,FName,FNumber,FGroup,FUseOrgId,FTEL",
	SearchField: "FName",
	OnlySign: "FCUSTID",
	GroupInfo: {
		FormId: "AMB_CustomerGroup",
		Field: "FGroup"
	},
	Type: 1
}, {
	// 养殖批次
	FormId: 'BAS_PreBaseDataOne',
	FilterString: [{ "Left": "(", "FieldName": "F_QUQY_SMSTATE", "Compare": "!=", "Value": "D", "Right": ")", "Logic": "and" },
	// { "Left": "(", "FieldName": "F_QUQY_SMSTATE", "Compare": "!=", "Value": "C", "Right": ")", "Logic": "and" }, // 20231205 修改
	],
	OrderString: "",
	FieldKeys: "FID,FName,FNumber,FUseOrgId,FUseOrgId.FName,FUseOrgId.FNumber,F_QUQY_COLUMNQTY,F_QUQY_Saleman,F_QUQY_Saleman.Fname,F_UTPA_Base.FName,F_UTPA_Base.FNumber,F_QUQY_Driver,F_UTPA_Text2,F_UTPA_Text,F_QUQY_FeedPrice,F_UTPA_Base.FNumber,F_UTPA_Base.FName",
	SearchField: "FName",
	OnlySign: "FID",
	Type: 1
}, {
	// 司机列表
	FormId: 'BAS_PreBaseDataTwo',
	FilterString: [],
	OrderString: "",
	FieldKeys: "FName,FNumber,F_QUQY_CarNumber,F_QUQY_Group,FUseOrgId",
	SearchField: "FName",
	OnlySign: "FNumber",
	Type: 1
}, {
	// 兽药库存查询
	FormId: 'QUQY_VDInventoryTable',
	FilterString: [],
	OrderString: "",
	FieldKeys: "F_QUQY_MaterialName,F_QUQY_MaterialID,F_QUQY_InventoryUnit,F_QUQY_InventoryQty,F_QUQY_Stock.FName,F_QUQY_StockTech.FName,F_QUQY_CostPrice,F_QUQY_OrgId.FName",
	SearchField: "F_QUQY_MaterialName",
	OnlySign: "F_QUQY_MaterialID",
	Type: 3
}, {
	// 员工列表
	FormId: 'BD_Empinfo',
	FilterString: [],
	OrderString: "",
	FieldKeys: "FName,FNumber,FID,FSTAFFNUMBER,FDocumentStatus",
	SearchField: "FName",
	OnlySign: "FNumber",
	Type: 1
}, {
	// 组织列表
	FormId: 'ORG_Organizations',
	FilterString: [],
	OrderString: "",
	FieldKeys: "FName,FNumber,FOrgID",
	SearchField: "FName",
	OnlySign: "FOrgID",
	Type: 1
}, {
	// 上苗计划
	FormId: 'QUQY_SeedPlan',
	FilterString: [],
	OrderString: "F_QUQY_SEEDDATE desc",
	FieldKeys: "FID,FBillNo,FDocumentStatus,F_QUQY_ModifyDate,F_QUQY_ApproverId,F_QUQY_CreatorId,F_QUQY_ORGID,F_QUQY_ModifierId,F_QUQY_ApproveDate,F_QUQY_SEEDDATE,F_QUQY_FARMERS.FName,F_QUQY_QTY,F_QUQY_MIAOPRICE,F_QUQY_HTMPRICE,F_QUQY_HSPRICE,F_QUQY_FXPRICE,F_QUQY_BZJPRICE,F_QUQY_SYPRICE,F_QUQY_SLPRICE,F_QUQY_STANDARD,F_QUQY_ABATTOIR.FName,F_QUQY_SUPPLIER,F_QUQY_LIAOCAR,F_QUQY_LIAOCAR.FName,F_QUQY_JSY,F_QUQY_TZBJ,F_QUQY_YWY,F_QUQY_MIAOCAR,F_QUQY_CreateDate,F_QUQY_YZTYPE,F_QUQY_MILEAGE,F_QUQY_PHONE,F_QUQY_ADDRESS,F_QUQY_MIAOCARN,F_QUQY_COLUMNQTY,F_QUQY_REMARK,F_QUQY_LIAOCARN,F_QUQY_SMSTATE,F_QUQY_CreatorId,F_QUQY_LOSSQTY",
	SearchField: "F_QUQY_FARMERS.FName",
	OnlySign: "FBillNo",
	AEUrl: "/views/module/forms/SeedlingRaisingPlan"
}, {
	// 苗损
	FormId: 'QUQY_LossInfoMiao',
	FilterString: [],
	OrderString: "F_QUQY_DATE desc",
	FieldKeys: "FID,FBillNo,FDocumentStatus,F_QUQY_BREEDBATCH,F_QUQY_BREEDBATCH.F_QUQY_SMSTATE,F_QUQY_DATE,F_QUQY_QTY,F_QUQY_AMOUNT,F_QUQY_BREEDBATCHPRO,F_QUQY_REMARK,F_QUQY_CREATORID,F_QUQY_CREATEDATE,F_QUQY_MODIFIERID,F_QUQY_MODIFYDATE,F_QUQY_APPROVERID,F_QUQY_APPROVEDATE,F_QUQY_ORGID,F_QUQY_COLUMNQTY,F_QUQY_CREATORID",
	SearchField: "F_QUQY_BREEDBATCHPRO",
	OnlySign: "FBillNo",
	AEUrl: "/views/module/forms/SeedlingLoss"
}, {
	// 养殖合同
	FormId: 'QUQY_BreContract',
	FilterString: [],
	OrderString: "F_QUQY_CreateDate desc",
	FieldKeys: "FID,FBillNo,FDocumentStatus,F_QUQY_CreatorId,F_QUQY_CreateDate,F_QUQY_ModifierId,F_QUQY_ModifyDate,F_QUQY_APPROVERID,F_QUQY_APPROVEDATE,F_QUQY_PARTYB.FName,F_QUQY_LCFACTORY,F_QUQY_YWY.FName,F_QUQY_PHONE,F_QUQY_JSY,F_QUQY_MIAOPRICE,F_QUQY_ISZG,F_QUQY_MIAOTOTALPRICE,F_QUQY_HTMPRICE,F_QUQY_HTMTOTALPRICE,F_QUQY_HTQTY,F_QUQY_SLPRICE,F_QUQY_STANDARD,F_QUQY_MILEAGE,F_QUQY_Remark,F_QUQY_SUPPLIER,F_QUQY_MIAODATE,F_QUQY_HSDATE,F_QUQY_BZJPRICE,F_QUQY_FXPRICE,F_QUQY_HSPRICE,F_QUQY_ORGID,F_QUQY_PARTYA.FName,F_QUQY_SFID,F_QUQY_SourceBillType,F_QUQY_SourceBillNo,F_QUQY_ADDRESS",
	SearchField: "FBillNo",
	OnlySign: "FBillNo",
	AEUrl: "/views/module/forms/BreedingContract"
}, {
	// 饲料申请
	FormId: 'QUQY_FeedApplication',
	FilterString: [],
	OrderString: "F_QUQY_CreateDate desc",
	FieldKeys: "FID,FBillNo,FDocumentStatus,F_QUQY_CreateDate,F_QUQY_ModifierId,F_QUQY_OrgId,F_QUQY_ApproveDate,F_QUQY_ApproverId,F_QUQY_CreatorId,F_QUQY_ModifyDate,F_QUQY_Date,F_QUQY_Remarks,F_QUQY_Saleman,F_QUQY_FeedSupplier.FName,F_QUQY_ApplyDriver.FName,F_QUQY_CarNumber,F_QUQY_Phone,F_QUQY_CustAddress,F_QUQY_BreedingBatch.FName,F_QUQY_PullingDriver1.FName,F_QUQY_FeedOrg,F_QUQY_OutboundCustID,F_QUQY_InternalPur,F_QUQY_OutboundWHID,F_QUQY_ReturnOrNot,F_QUQY_CreatorId",
	SearchField: "FBillNo",
	OnlySign: "FBillNo",
	AEUrl: "/views/module/forms/FeedApplication"
}, {
	// 饲料出库
	FormId: 'QUQY_SalesDeliveryOrder',
	FilterString: [],
	OrderString: "F_QUQY_CreateDate desc",
	FieldKeys: "FID,FBillNo,FDocumentStatus,F_QUQY_Date,F_QUQY_CreateDate,F_QUQY_ModifyDate,F_QUQY_ApproveDate,F_QUQY_OrgId,F_QUQY_CreatorId,F_QUQY_BreedingContract.FName,F_QUQY_FeedApplication,F_QUQY_InternalPur,F_QUQY_ApplyDriver.FName,F_QUQY_PullingDriver1,F_QUQY_PullingDriver1.FName,F_QUQY_FeedSupplier.FName,F_QUQY_TotalApply",
	SearchField: "F_QUQY_BreedingContract.FName",
	OnlySign: "FBillNo",
	AEUrl: "/views/module/forms/SalesDeliveryOrder"
}, {
	// 兽药申请 开药 退药负数
	FormId: 'QUQY_VeterinaryMedicineApplication',
	FilterString: [],
	OrderString: "F_QUQY_Date desc",
	FieldKeys: "FID,FBillNo,FDocumentStatus,F_QUQY_ApproverId,F_QUQY_ApproveDate,F_QUQY_OrgId,F_QUQY_CreatorId,F_QUQY_ModifyDate,F_QUQY_CreateDate,F_QUQY_ModifierId,F_QUQY_BreedingContract.FName,F_QUQY_Date,F_QUQY_Customer.FName,F_QUQY_CustAddress,F_QUQY_CustTelephone,F_QUQY_DrugRepercussion,F_QUQY_CreatorId",
	SearchField: "FBillNo",
	OnlySign: "FBillNo",
	AEUrl: "/views/module/forms/VeterinaryDrugApplication"
}, {
	// 兽药出库
	FormId: 'QUQY_DrugOutbound',
	FilterString: [],
	OrderString: "F_QUQY_CreateDate desc",
	FieldKeys: "FID,FBillNo,FDocumentStatus,F_QUQY_Date,F_QUQY_CreateDate,F_QUQY_ModifyDate,F_QUQY_ApproveDate,F_QUQY_OrgId,F_QUQY_CreatorId,F_QUQY_BreedingContract.FName,F_QUQY_DrugApplication,F_QUQY_Technician,F_QUQY_Technician.FName,F_QUQY_Customer,F_QUQY_DrugRepercussion,F_QUQY_RealQty,F_QUQY_TotalTaxAmount",
	SearchField: "FBillNo",
	OnlySign: "FBillNo",
	AEUrl: "/views/module/forms/DrugOutbound"
}, {
	// 兽药调拨申请
	FormId: 'QUQY_TransferApplication',
	FilterString: [],
	OrderString: "F_QUQY_CreateDate desc",
	FieldKeys: "FID,FBillNo,FDocumentStatus,F_QUQY_Date,F_QUQY_CreateDate,F_QUQY_ModifyDate,F_QUQY_ApproveDate,F_QUQY_OrgId.FName,F_QUQY_OrgId,F_QUQY_CreatorId,F_QUQY_ModifierId,F_QUQY_ApproverId,F_QUQY_TransferDirect,F_QUQY_Applicant,F_QUQY_Applicant.FName,F_QUQY_CREATORID",
	SearchField: "FBillNo",
	OnlySign: "FBillNo",
	AEUrl: "/views/module/forms/TransferApplication"
}, {
	// 兽药调拨
	FormId: 'QUQY_VeterinaryDrugAllot',
	FilterString: [],
	OrderString: "F_QUQY_CreateDate desc",
	FieldKeys: "FID,FBillNo,FDocumentStatus,F_QUQY_Date,F_QUQY_CreateDate,F_QUQY_ModifyDate,F_QUQY_ApproveDate,F_QUQY_OrgId,F_QUQY_TransferDirect,F_QUQY_Applicant,F_QUQY_Applicant.FName,F_QUQY_CreatorId",
	SearchField: "FBillNo",
	OnlySign: "FBillNo",
	AEUrl: "/views/module/forms/VeterinaryDrugAllot",
}, {
	// 兽药仓库
	FormId: 'QUQY_VeterinaryDrugStock',
	FilterString: [],
	OrderString: "FCreateDate desc",
	FieldKeys: "FID,FUseOrgId,FNumber,FName,F_QUQY_Technician,F_QUQY_StoreType,FUseOrgId",
	SearchField: "FName",
	OnlySign: "FNumber",
	Type: 1
}, {
	// 养殖结算单
	FormId: 'QUQY_Settle',
	FilterString: [],
	OrderString: "F_QUQY_CreateDate desc",
	FieldKeys: "FID,FBillNo,FDocumentStatus,F_QUQY_YWY.FName,F_QUQY_BREEDBATCH.FName,F_QUQY_HTNUMBER,F_QUQY_HTQTY,F_QUQY_ALLINAMOUNT,F_QUQY_ALLSUBAMOUNT,F_QUQY_ALLOUTAMOUNT,F_QUQY_PROFIT,F_QUQY_RECEIVEAMOUNT,F_QUQY_PAYAMOUNT,F_QUQY_ApproveDate,F_QUQY_JSSTATUS,F_QUQY_YWY,F_QUQY_ORGID",
	SearchField: "F_QUQY_BREEDBATCH.FName",
	OnlySign: "FBillNo",
	AEUrl: "/views/module/forms/SettlementForm"
},  {
	// 养殖合同明细
	FormId: 'QUQY_GetBreContract',
	FilterString: [],
	FieldKeys: "FBillNo,F_QUQY_YZFID.FName,F_QUQY_HTQTY,F_QUQY_MIAODATE,F_QUQY_SYDAY,F_QUQY_EATMATER,F_QUQY_STANDARD,F_QUQY_ISOVER,F_QUQY_OVERMATER,F_QUQY_ACCFEEDINJIN,F_QUQY_SMSTATE,F_QUQY_YWY.Fname",
	SearchField: "F_QUQY_YZNAME",
	OnlySign: "FBillNo",
	OrderString: "F_QUQY_OVERMATER desc,F_QUQY_MIAODATE desc"
}, {
	// 养户结算单
	FormId: 'QUQY_YHSettle',
	FilterString: [],
	OrderString: "F_QUQY_CreateDate desc",
	FieldKeys: "FID,FBillNo,FDocumentStatus,F_QUQY_YWY.FName,F_QUQY_BREEDBATCH.FName,F_QUQY_HTNUMBER,F_QUQY_HTQTY,F_QUQY_ALLINAMOUNT,F_QUQY_ALLSUBAMOUNT,F_QUQY_ALLOUTAMOUNT,F_QUQY_PROFIT,F_QUQY_RECEIVEAMOUNT,F_QUQY_PAYAMOUNT,F_QUQY_ApproveDate,F_QUQY_JSSTATUS,F_QUQY_YWY,F_QUQY_ORGID",
	SearchField: "F_QUQY_BREEDBATCH.FName",
	OnlySign: "FBillNo",
	AEUrl: "/views/module/forms/YHSettlementForm"
}]


		// 养殖合同明细
		// 结算单号 // FBillNo
	//  数据状态： FDocumentStatus
	//   养殖批次：F_QUQY_BREEDBATCH  (必填项)
	//  组织：F_QUQY_ORGID  (必填项)
	//  身份证号：F_QUQY_SFID 
	//  合同编号：F_QUQY_HTNUMBER 
	//  合同数量：F_QUQY_HTQTY 
	//   上苗日期：F_QUQY_SEEDDATE 
	//  回收日期 F_QUQY_HSDATE
	//   总胴体：F_QUQY_CARCASS 
	//  料肉比：F_QUQY_LRPERCENT 
	// 料运费：F_QUQY_LFREIGHT
	// 风险金：F_QUQY_FXPRICE 
	//  总收入：F_QUQY_ALLINAMOUNT 
	// 总补贴：F_QUQY_ALLSUBAMOUNT
	// 总支出：F_QUQY_ALLOUTAMOUNT 
	// 养殖利润：F_QUQY_PROFIT 
	// 已收款：F_QUQY_RECEIVEAMOUNT 
	// 实付金额：F_QUQY_PAYAMOUNT 
	// 付款账号：F_QUQY_PAYACCOUNT 
	//  结算状态：F_QUQY_JSSTATUS  (必填项)
	 





// 基础资料默认查询审核过的、未禁止的(A:否，B:是)
baseList.filter(it => it.Type === 1).forEach(it => it.FilterString = [{ "Left": "(", "FieldName": "FDocumentStatus", "Compare": "=", "Value": "C", "Right": ")", "Logic": "and" }, { "Left": "(", "FieldName": "FForbidStatus", "Compare": "=", "Value": "A", "Right": ")", "Logic": "and" }].concat(it.FilterString))

// 转到baseList 中处理
// // 获取某个
// let findIndexFun = (FormId, FR) => {
// 	let index = baseList.findIndex(it => it.FormId == FormId)
// 	baseList[index].FilterString = baseList[index].FilterString.concat(FR)
// }

// // 根据角色划分权限
// let myInfo = uni.getStorageSync('myInfo')
// let userInfo = uni.getStorageSync('userInfo')
// let memberInfo = uni.getStorageSync('memberInfo')

// // 🍕 养殖批次
// let FR_YZPC = [
// 	{ Left: "(", FieldName: "F_QUQY_Driver", Compare: "=", Value: userInfo.F_QUQY_Driver_Id, Right: ")", Logic: "and", R: 1 },
// 	{ "Left": "(", "FieldName": "F_QUQY_Saleman", "Compare": "=", "Value": memberInfo.Id, "Right": ")", "Logic": "and", R: 3 },
// 	{ Left: "(", FieldName: "FUseOrgId", Compare: "=", Value: memberInfo.F_QUQY_COMPANY_Id, Right: ")", Logic: "and", R: 5 },
// 	{ "Left": "(", "FieldName": "F_QUQY_JSY", "Compare": "=", "Value": memberInfo.Id, "Right": ")", "Logic": "and", R: 5 },
// ]
// findIndexFun('BAS_PreBaseDataOne', FR_YZPC)

// // 🍕 仓库
// let FR_CK = [
// 	{ Left: "(", FieldName: "F_QUQY_StoreType", Compare: "=", Value: "公司仓", Right: ")", Logic: "and", filterFlag: "jc", R: 5 },
// 	{ Left: "(", FieldName: "FUseOrgId", Compare: "=", Value: memberInfo.F_QUQY_COMPANY_Id, Right: ")", Logic: "or", filterFlag: "jc", R: 5 },
// 	{ Left: "(", FieldName: "F_QUQY_Technician", Compare: "=", Value: memberInfo.Id, Right: ")", Logic: "and", R: 5 },
// ]
// findIndexFun('QUQY_VeterinaryDrugStock', FR_CK)

// // 🍕 养殖户
// let FR_YZH = [
// 	{ "Left": "(", "FieldName": "FUseOrgId", "Compare": "=", "Value": memberInfo.UseOrgId_Id, "Right": ")", "Logic": "and", R: 3 },
// ]
// findIndexFun('BD_Customer', FR_YZH)
// // 🍕 用户不存在 0
// if (myInfo.role.includes(1)) {
// 	// 司机
// 	// 🍕 列表权限
// 	// 饲料申请： 创建人是自己的，未结算的
// 	let FR = [{ "Left": "(", "FieldName": "F_QUQY_CREATORID", "Compare": "=", "Value": myInfo.UserId, "Right": ")", "Logic": "and" }]
// 	findIndexFun('QUQY_FeedApplication', FR)

// 	// 饲料出库： 拉料司机是自己的
// 	let FR1 = [{ "Left": "(", "FieldName": "F_QUQY_PullingDriver1", "Compare": "=", "Value": userInfo.F_QUQY_Driver_Id, "Right": ")", "Logic": "and" }]
// 	findIndexFun('QUQY_SalesDeliveryOrder', FR1)

// 	// // 🍕 饲料按照饲料供应商来筛选
// 	// let FR3 = []
// 	// findIndexFun('BD_MATERIAL', FR3)

// }
// if (myInfo.role.includes(3)) {
// 	// 业务员
// 	// 🍕 列表权限
// 	// 上苗计划、养殖结算单： 业务员是自己的
// 	let FR = [{ "Left": "(", "FieldName": "F_QUQY_YWY", "Compare": "=", "Value": memberInfo.Id, "Right": ")", "Logic": "and" }]
// 	findIndexFun('QUQY_SeedPlan', FR)
// 	findIndexFun('QUQY_Settle', FR)

// 	// 苗损列表： 创建人是自己的
// 	let FR1 = [{ "Left": "(", "FieldName": "F_QUQY_CREATORID", "Compare": "=", "Value": userInfo.Id, "Right": ")", "Logic": "and" }]
// 	findIndexFun('QUQY_LossInfoMiao', FR1)

// }
// if (myInfo.role.includes(5)) {
// 	// 技术员  隐藏
// 	// 🍕 列表权限
// 	// 兽药申请、兽药调拨申请： 创建人是自己的
// 	let FR = [{ "Left": "(", "FieldName": "F_QUQY_CREATORID", "Compare": "=", "Value": userInfo.Id, "Right": ")", "Logic": "and" }]
// 	// findIndexFun('QUQY_VeterinaryMedicineApplication', FR)
// 	findIndexFun('QUQY_TransferApplication', FR)

// 	// 兽药出库、兽药调拨 技术员是自己的
// 	let FR1 = [{ "Left": "(", "FieldName": "F_QUQY_Technician", "Compare": "=", "Value": memberInfo.Id, "Right": ")", "Logic": "and" }]
// 	findIndexFun('QUQY_DrugOutbound', FR1)
// 	let FR2 = [{ "Left": "(", "FieldName": "F_QUQY_Applicant", "Compare": "=", "Value": memberInfo.Id, "Right": ")", "Logic": "and" }]
// 	findIndexFun('QUQY_VeterinaryDrugAllot', FR2)

// }
// if (myInfo.role.includes(7)) {
// 	// 🍕 养殖场会计 7  所有单据只看到自己组织下的
// 	baseList.filter(it => it.Type !== 1).forEach(it => it.FilterString = [{ "Left": "(", "FieldName": "F_QUQY_ORGID", "Compare": "=", "Value": myInfo.CurrentOrganizationInfo.ID, "Right": ")", "Logic": "or" }].concat(it.FilterString))
// }

export default baseList